package top.linesoft.biptstudy;

import java.util.ArrayList;

class Student extends User {

    ArrayList<OfferCourse> course = new ArrayList<OfferCourse>();

    Student(int id, String name, String gender) {
        super(id, name, gender);
    }

    // 选择某课
    void selectCourse(OfferCourse offerCourse) {
        course.add(offerCourse);
    }

    // 退出某课
    void exitCourse(OfferCourse offerCourse) {
        course.remove(offerCourse);
    }

    void printTimetable() {
        int i;
        for (i = 0; i < course.size(); i++) {
            // 包括：编号、课程名称、上课地点、时间、授课教师等
            System.out.println(course.get(i).toString());
        }

    }
}